package com.scs.application.modules.base.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.scs.application.core.query.QueryContext;
import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.base.dto.SpChangeNameDTO;
import com.scs.application.modules.base.entity.Supplier;
import com.scs.application.modules.sys.model.RestResult;
import com.scs.application.modules.thirdparty.dto.SupplierDTO;

import javax.validation.Valid;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Service
 * </p>
 */

public interface SupplierService extends IBaseService<Supplier> {

    /**
     * 从MSCM系统中同步供应商
     */
    String syncSupplierFromMscm();

    /**
     * 根据MSCMCode获取供应商信息
     * @param mscmCode
     * @return
     */
    Supplier getSupplierByMscmCode(String mscmCode);

    /**
     * 从Hrp系统中同步供应商
     */
    RestResult syncSupplierFromHrp(List<SupplierDTO> object);

    Page<Map> pageForSelect(QueryContext context, Map<String, Object> userParam);

    String supplierToMscm();

    String changeName(@Valid SpChangeNameDTO changeParam);
}
